using System;
using System.Collections.Generic;
using System.Text;

namespace PoliceBase
{
    public class Incident
    {
        #region DataFields
        private int _id;
        private string _type;
        private Address _address;
        private int _victims;
        private bool _fire;
        private bool _injuries;
        private int _paramA;
        private int _paramB;
        private string _reporterName;
        private Address _reporterAddress;
        private long _reporterID;
        private bool _coverd;
        private DateTime _reportingDate = DateTime.Now;
        private DateTime _date = DateTime.Now;
        #endregion

        #region Properties
        public int Id
        {
            get { return _id; }
        }
        public string Type
        {
            get { return _type; }
        }
        public Address Address
        {
            get { return _address; }
        }
        public int Victims
        {
            get { return _victims; }
        }
        public bool Fire
        {
            get { return _fire; }
        }
        public bool Injuries
        {
            get { return _injuries; }
        }
        public int ParamA
        {
            get { return _paramA; }
        }
        public int ParamB
        {
            get { return _paramB; }
        }
        public string ReporterName
        {
            get { return _reporterName; }
        }
        public Address ReporterAddress
        {
            get { return _reporterAddress; }
        }
        public long ReporterID
        {
            get { return _reporterID; }
        }
        public bool Coverd
        {
            get { return _coverd; }
            set { _coverd = value; }
        }
        public DateTime ReportingDate
        {
            get { return _reportingDate; }
        }
        public DateTime Date
        {
            get { return _date; }
        }
        #endregion

        #region Constructors
        public Incident(bool injuries, int victims, int paramA, int paramB, bool fire, Address address, string reporterName, long reporterID, string type, DateTime reportingDate, DateTime date)
        {
            this._id = -1;
            this._type = type;
            this._injuries = injuries;
            this._victims = victims;
            this._paramA = paramA;
            this._paramB = paramB;
            this._fire = fire;
            this._address = address;
            this._reporterName = reporterName;
            this._reporterID = reporterID;
            this._reportingDate = reportingDate;
            this._date = date;
            this._coverd = false;
        }
        public Incident(int id, bool injuries, int victims, int paramA, int paramB, bool fire, Address address, string reporterName, long reporterID, string type, DateTime reportingDate, DateTime date)
        {
            this._id = id;
            this._type = type;
            this._injuries = injuries;
            this._victims = victims;
            this._paramA = paramA;
            this._paramB = paramB;
            this._fire = fire;
            this._address = address;
            this._reporterName = reporterName;
            this._reporterID = reporterID;
            this._reportingDate = reportingDate;
            this._date = date;
            this._coverd = false;

            this._reporterAddress = null;
        }
        #endregion

        #region PublicMethos
        public string generateReport()
        {
            return this.ToString();
        }
        public override string ToString()
        {
            string str = "";
            str += "Incident ID : " + this._id + "\n" +
                    "Incident type : " + this._type + "\n" +
                    "Number of victims : " + this._victims + "\n" +
                    "Incident address : " + this._address.ToString() + "\n" +
                    "Reporter name : " + this._reporterName + "\n" +
                    "Reporter ID : " + this._reporterID + "\n" +
                    "Status : " + ((this._coverd) ? "covered" : "not covered");
            return str;
        }
        #endregion
    }
}
